﻿<%@ Page Title="Bewerk Geregistreerdegebruikers" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Geregistreerdegebruikers.aspx.cs" Inherits="WebApplication2.EditPages.Geregistreerdegebruikers" %>
<asp:Content runat="server" ID="FeaturedContent" ContentPlaceHolderID="FeaturedContent">
    <section class="featured">
        <div class="content-wrapper">
            <hgroup class="title">
                <h1><%: Title %>.</h1>
                <h2>Groep16 - Festivalinfo</h2>
            </hgroup>
            <p>
                Hier kan je de gegevens van de tabel Geregistreerdegebruikers bewerken.
            </p>
        </div>
    </section>
</asp:Content>
<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">

    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="gebr_id" DataSourceID="SqlDataSource1" AutoGenerateEditButton="True" AutoGenerateDeleteButton="True" OnRowEditing="GridView1_RowEditing" OnRowCancelingEdit="GridView1_RowCancelingEdit" OnRowUpdating="GridView1_RowUpdating" OnRowDeleting="GridView1_RowDeleting">
        <Columns>
            <asp:BoundField DataField="gebr_id" HeaderText="id" InsertVisible="False" ReadOnly="True" SortExpression="gebr_id" />
            <asp:BoundField DataField="gebr_naam" HeaderText="naam" SortExpression="gebr_naam" />
            <asp:BoundField DataField="gebr_adres" HeaderText="adres" SortExpression="gebr_adres" />
            <asp:BoundField DataField="gebr_gebDat" HeaderText="geboortedatum" SortExpression="gebr_gebDat" />
            <asp:BoundField DataField="gebr_pass" HeaderText="wachtwoord" SortExpression="gebr_pass" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:groep16_festivalsConnectionString %>" SelectCommand="SELECT * FROM [geregistreerdegebruikers]" DeleteCommand="DELETE FROM [geregistreerdegebruikers] WHERE [gebr_id] = @gebr_id" InsertCommand="INSERT INTO [geregistreerdegebruikers] ([gebr_naam], [gebr_adres], [gebr_gebDat], [gebr_pass]) VALUES (@gebr_naam, @gebr_adres, @gebr_gebDat, @gebr_pass)" UpdateCommand="UPDATE [geregistreerdegebruikers] SET [gebr_naam] = @gebr_naam, [gebr_adres] = @gebr_adres, [gebr_gebDat] = @gebr_gebDat, [gebr_pass] = @gebr_pass WHERE [gebr_id] = @gebr_id">
        <DeleteParameters>
            <asp:Parameter Name="gebr_id" Type="Int32" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="gebr_naam" Type="String" />
            <asp:Parameter Name="gebr_adres" Type="String" />
            <asp:Parameter DbType="Date" Name="gebr_gebDat" />
            <asp:Parameter Name="gebr_pass" Type="String" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="gebr_naam" Type="String" />
            <asp:Parameter Name="gebr_adres" Type="String" />
            <asp:Parameter DbType="Date" Name="gebr_gebDat" />
            <asp:Parameter Name="gebr_pass" Type="String" />
            <asp:Parameter Name="gebr_id" Type="Int32" />
        </UpdateParameters>
    </asp:SqlDataSource>

</asp:Content>